/***************************************************************
 * created by yang.zheng on 2020-07-29 for user info data model
 ***************************************************************/

 //引入连接好的数据库对象
 const CrmDB = require('../db/MongoConn')

 //用户信息的描述文档
 const UserSchema = new CrmDB.Schema({
     userId:String,
     state:String,
     userPwd:String,
     userName:String,
     userData:Date,
     userSex:String,
     userAddress:String,
     userPhoto:String,
     userMoblie:String,
     userEmail:String,
     userEntry:Date,
     userDept:String,
     userPosition:String,
     userRole:String,
     userRemark:String
 })

 //导出user数据模型，供业务组件使用
 module.exports = CrmDB.model('UserSchema',UserSchema,'user_coll')